/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once
#include <assert.h>
#include <向量.h>
#include <公共函数.h>

//#include <Vector/向量运算.h>

#include <A_CUDA数学Core/vec2.h>
#include <A_CUDA数学Core/vec3.h>
#include <A_CUDA数学Core/vec4.h>
#include <A_CUDA数学Core/point3.h>
#include <A_CUDA数学Core/maths.h>

#include "几何计算.h"


#include <cassert>






//====================================== 废弃 ========================================

//Inline vec4 f_graph_quat旋转(const vec4& q1, const vec4& q2) {
//	vec4 newQuat;
//	newQuat.w = q2.w * q1.w - q2.x * q1.x - q2.y * q1.y - q2.z * q1.z;
//	newQuat.x = q2.w * q1.x + q2.w * q1.x + q1.y * q2.z - q2.z * q1.y;
//	newQuat.y = q2.w * q1.y - q2.x * q1.z + q2.y * q1.w + q2.z * q1.x;
//	newQuat.z = q2.w * q1.z + q2.x * q1.y - q2.y * q1.x + q2.z * q1.w;
//	return newQuat;
//}



/*CUDA_CALLABLE Inline vec3 f_quat_tranform(const vec4& m1, const vec3& m2) {
	vec3 r;
	r.x = m2.x * m1.x + m2.x * m1.y + m2.x * m1.z + m2.x * m1.w;
	r.y = m2.y * m1.x + m2.y * m1.y + m2.y * m1.z + m2.y * m1.w;
	r.z = m2.z * m1.x + m2.z * m1.y + m2.z * m1.z + m2.z * m1.w;
	return r;
}*/

/*Inline vec3 f_graph_方向转角度(const vec3& dir) {
	vec3 euler;
	euler.x = acosf(sqrtf((dir.x * dir.x + dir.z * dir.z) / (dir.x * dir.x + dir.y * dir.y + dir.z * dir.z)));
	euler.x = M_弧度转角度(euler.x);

	euler.y = M_弧度转角度(atan2f(dir.x, dir.z));

	if (euler.y < 0) euler.y += 180;

}*/

//Inline vec3 f_graph_quatTranformInv(const vec4& q, const vec3& pos) {
//	vec3 qv = { q.x, q.y, q.z };
//	vec3 newPos = pos * (2.0f * q.w * q.w - 1.0f);
//	newPos = newPos - (vec_cross(qv, pos) * q.w * 2.0f) + (qv * vec_dot(qv, pos) * 2.0f);
//	return newPos;
//}




